import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: 'grade',
    align:"center",
    dataIndex: 'grade'
   },
   {
    title: 'phone',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: 'name',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: 'timelong',
    align:"center",
    dataIndex: 'timelong'
   },
   {
    title: 'time',
    align:"center",
    dataIndex: 'time'
   },
   {
    title: 'us',
    align:"center",
    dataIndex: 'us'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: 'grade',
    field: 'grade',
    component: 'Input',
  },
  {
    label: 'phone',
    field: 'phone',
    component: 'Input',
  },
  {
    label: 'name',
    field: 'name',
    component: 'Input',
  },
  {
    label: 'timelong',
    field: 'timelong',
    component: 'InputNumber',
  },
  {
    label: 'time',
    field: 'time',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: 'us',
    field: 'us',
    component: 'InputNumber',
  },
  {
    label: 'id',
    field: 'id',
    component: 'Input',
  },
];

// 高级查询数据
export const superQuerySchema = {
  grade: {title: 'grade',order: 0,view: 'text', type: 'string',},
  phone: {title: 'phone',order: 1,view: 'text', type: 'string',},
  name: {title: 'name',order: 2,view: 'text', type: 'string',},
  timelong: {title: 'timelong',order: 3,view: 'number', type: 'number',},
  time: {title: 'time',order: 4,view: 'datetime', type: 'string',},
  us: {title: 'us',order: 5,view: 'number', type: 'number',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}